home *** CD-ROM | disk | FTP | other *** search
- /******************************************************************************
- *
- * NSSDC/CDF Return size (in bytes) of a data type element.
- *
- * Version 1.0, 25-Feb-92, Hughes STX
- *
- * Modification history:
- *
- * V1.0 25-Feb-92, J Love Original version.
- *
- ******************************************************************************/
-
- #include "cdfdist.h"
-
- /******************************************************************************
- * ElemSize.
- ******************************************************************************/
-
- int ElemSize(dataType)
- long dataType;
- {
- switch (dataType) {
- case CDF_BYTE: return 1;
- case CDF_INT1: return 1;
- case CDF_INT2: return 2;
- case CDF_INT4: return 4;
- case CDF_UINT1: return 1;
- case CDF_UINT2: return 2;
- case CDF_UINT4: return 4;
- case CDF_REAL4: return 4;
- case CDF_REAL8: return 8;
- case CDF_FLOAT: return 4;
- case CDF_DOUBLE: return 8;
- case CDF_EPOCH: return 8;
- case CDF_CHAR: return 1;
- case CDF_UCHAR: return 1;
- }
- return 0;
- }
-